import React from 'react';
import Helmet from 'react-helmet';
import { Link } from 'umi';

import styles from './LoginLayout.less';
import { APP_TITLE, APP_TITLE_EN } from '@/utils/constants';

function LoginLayout({ children }) {
  return (
    <>
      <Helmet>
        <title>{APP_TITLE}-Sign in</title>
        <meta name="description" content={APP_TITLE} />
      </Helmet>
      <div className={styles.container}>
        <div className={styles.content}>
          <div className={styles.top}>
            <div className={styles.header}>
              <Link to="/">
                <span className={styles.title}> {APP_TITLE} </span>
              </Link>
            </div>
            <div className={styles.desc}>{APP_TITLE_EN}</div>
          </div>
          {children}
        </div>
      </div>
    </>
  );
}

export default LoginLayout;
